package ynu.lcy.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import ynu.lcy.dto.file.UploadFileRequest;
import ynu.lcy.elememicroserviceserviceclient.service.FileUploadFeignClient;
import ynu.lcy.service.UploadService;

import javax.annotation.Resource;

@RestController
@RequestMapping("/inner")
public class UploadInnerController implements FileUploadFeignClient {

    @Resource
    private UploadService service;

    @PostMapping("/upload")
    @Override
    public String upload(@RequestBody UploadFileRequest request) {
        return service.uploadFile(request,"");
    }
}
